<!doctype html>
<html lang="zh" translate="no">

<head>
    <title>
    FrameCoder集约化平台
    </title>
    <meta charset="utf-8">
    <script src="/static/admin/lib/jquery/jquery.min.js"></script>
    <link href="/static/admin/css/theme.css" rel="stylesheet">
    <style>
        <?php if (isset($crumb[0]) && $crumb[0]['belong'] == 2) {
        ?> :root {
            --primary-color: #016243
        }

        <?php
        } ?>
    </style>
    <link href="/static/admin/css/rovecoder.css" rel="stylesheet" />
    <link href="/static/admin/lib/layui/css/layui.css" rel="stylesheet">
    <script src="/static/admin/lib/layui/layui.js"></script>
    <script src="/static/admin/lib/toastr/toastr.min.js"></script>
    <link href="/static/admin/lib/toastr/toastr.min.css" rel="stylesheet">
    <script src="/static/admin/js/rovecoder.js"></script>


</head>

<body style="background-color: #FAFBFB;">
    <?php include $template ?>


    <script>
        layui.use(function() {
            var $ = layui.jquery;
            var layer = layui.layer;
            var form = layui.form;
            $(document).on('click', '#changepwd', function() {
                layer.open({
                    type: 1,
                    title: '修改密码',
                    area: ['420px', '300px'], // 宽高
                    content: $('#changepwddiv').html()
                });
            })

            form.on('submit(changepwd_submit)', function(data) {
                var data = data.field;
                $.ajax({
                    url: "/bcsadmin/Personal/changepwd", //请求路径
                    type: "POST", //请求方式
                    data: data,
                    success: function(data) {
                        if (data.code == 0) {
                            toastr_success("修改成功", function() {
                                layer.closeAll();
                            });
                        } else {
                            toastr_error(data.message);
                        }
                    },
                    error: function() {

                    },

                });
            });
        });
    </script>
</body>

</html>